package com.springTxStudy.service;

/*
展示事务传播的业务类
 */

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class StudentTxSpreadService {

    @Autowired
    private StudentService studentService;

    public void changeInfo() {
        studentService.updateNameById(1, "老六");
        studentService.updateAgeById(1, 6);
    }

}
